import java.io.FileWriter;
import java.io.IOException;
import java.time.LocalDateTime;

public class LogManager {
    public void log(String operator, String actionType, String detail) {
        try (FileWriter fw = new FileWriter("system.log", true)) {
            fw.write(LocalDateTime.now() + " | " + actionType + " | " + operator + " | " + detail + "\n");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
} 